package com.aifund.app.service.impl;

import com.aifund.app.service.ExchangeManTacticsService;
import com.aifund.common.dao.ExchangeManTacticsDao;
import com.aifund.common.entity.ExchangeManTactics;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class ExchangeManTacticsServiceImpl implements ExchangeManTacticsService {

    @Autowired
    ExchangeManTacticsDao exchangeManTacticsDao;

    @Override
    public ExchangeManTactics getById(Long id) {
        return exchangeManTacticsDao.getById(id);
    }

    @Override
    public List<Long> getAllManByExchangeIdAndStatus(Long exchangeId, Integer status) {
        return exchangeManTacticsDao.getAllManByExchangeIdAndStatus(exchangeId,status);
    }

    @Override
    public List<ExchangeManTactics> findAllByExchangeIdAndStatus(Long exchangeId, Integer status) {
        return exchangeManTacticsDao.findAllByExchangeIdAndStatus(exchangeId,status);
    }

    @Override
    public ExchangeManTactics save(ExchangeManTactics exchangeManTactics) {
        ExchangeManTactics save = exchangeManTacticsDao.save(exchangeManTactics);
        return save;
    }

    @Override
    public List<Long> getExchangeIdByUserIdAndStatus(Long userId, Integer status) {
        return exchangeManTacticsDao.getExchangeIdByUserIdAndStatus(userId,status);
    }
}
